package api.cherry.feign;

import api.cherry.feign.factory.CrApiLoginServiceFactory;
import cherry.data.util.Result;
import cherry.data.view.request.CherryRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Author : ms-wang
 * @Version : 1.0.0
 * @ClassName LoginService
 * @Description : 远程调用登录接口
 * @Date: 2022/2/7/007 12:16
 */
@FeignClient(name = "cherry-service-provide", fallbackFactory = CrApiLoginServiceFactory.class)
public interface CrApiLoginService {

    @RequestMapping(value = "/api/v1/cherry/login", method = RequestMethod.POST)
    Result<?> logIns(@RequestBody CherryRequest request);


    @RequestMapping(value = "/api/v1/cherry/register", method = RequestMethod.POST)
    Result<?> register(@RequestBody CherryRequest request);
}
